package com.chidopi.market.bookstore.service.impl;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;

import com.chidopi.cdf.dao.IBaseDao;
import com.chidopi.cdf.service.IBaseService;
import com.chidopi.market.bookstore.domain.Book2City;

public class Book2CityServiceImpl implements IBaseService<Book2City> {
	private static Logger logger = LoggerFactory.getLogger(Book2CityServiceImpl.class);
	
	@Autowired
	@Qualifier("book2cityDao")
	private IBaseDao<Book2City> book2cityDao;
	
	@Override
	public int insert(Book2City t) throws Exception {
		return this.book2cityDao.insert(t);
	}

	@Override
	public int update(Book2City t) throws Exception {
		logger.debug("update!");
		return this.book2cityDao.update(t);
	}

	@Override
	public int delete(Book2City t) throws Exception {
		return this.book2cityDao.delete(t);
	}

	@Override
	public List<Book2City> find(String sqlWhere, Object... args)
			throws Exception {
		return this.book2cityDao.find(sqlWhere, args);
	}

	@Override
	public Book2City findById(Object id) throws Exception {
		return this.book2cityDao.findById(id);
	}

	@Override
	public int getNextSequence() throws Exception {
		return 0;
	}

}
